package com.jx.lcs.util.common;

/**
 * 身份证加密工具  
 */
public class IdCardUtil {

	/**
	 * 身份证加密
	 * @param idCard
	 * @return
	 */
	public static String getIdCardEcp(String idCard) {
		String result = "";
		if(idCard != null && !"".equals(idCard) && idCard.length() >= 10) {
			String str = idCard.substring(3, idCard.length() - 4);
			result = idCard.replace(str, "***********");
		}
		return result;
	}
	
	public static void main(String args[]){
		System.out.println(getIdCardEcp("123456789987654321"));
	}
}
